<?php
include_once('functions.php');
get_xml();

//获取cron文件时间
function get_ftime(){
 $file=file('data/cront.txt');
 $ftime=$file[0];
 return date('Y-n-j G:i:s',$ftime);
}

$lnum=$ran_link[$num];
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <title>周刊VOCALOID中文曲排行榜</title>
  <meta charset="UTF-8"/>
  <meta name="Generator" content="EditPlus?"/>
  <meta name="Author" content=""/>
  <meta name="Keywords" content=""/>
  <meta name="Description" content=""/>
  <meta name="robots" content="noindex,nofollow">
  <link rel="stylesheet" media="all" href="assets/index.css?body=1" />
  <script src="assets/jquery.min.js"></script>
  <script>window.jQuery || document.write('<script src="assets/jquery-2.1.1.min.js"><\/script>')</script>
</head>
<body>
<div class="wrap" style="box-shadow:0 2px 6px rgba(100, 100, 100, 0.3);">
  <div class="span_top">
    <img src="assets/top.jpg" alt="Top" />

    <div class="ranker" style="width:700px;padding:10px;margin-left:20px;float:left;">
      <h4 id="MainList_Title">周刊VOCALOID中文排行榜♪往期榜单列表</h4>
      <span class="ranker_b"><a class="viewer" href="index.php" target="_blank"></a></span>
      <div class="feeds_list">
	  <?php //下方高能反应（自己都有点凌乱……）
	  //准备填充
				  for($i=0;$i<$ransum;$i++){
                    $inum=$ranxml[$ran_link[$ran_sort[$i]]]->num;
					$incdata=$ranxml[$ran_link[$ran_sort[$i]]]->incdata;
                    $feedata=get_vcran_data($incdata);
					 ?>
        <div class="feeds_main">
          <div class="feeds_index">
            <h4><?php echo $inum;?></h4>
          </div>
          <div class="feeds_text">
            <span class="title"><a href="index.php?n=<?php echo $inum;?>" target="_blank">周刊VOCALOID中文排行榜♪<?php echo $inum;?></a></span>
<span class="l_number firstline"><i><a style="color: #9CA4B1;" href="http://www.bilibili.com/video/av<?php echo $feedata[avid][0];?>/">1st:<?php echo $feedata[title][0];?></a></i></span>
<span class="l_number"><i>数据更新：<?php echo $ranxml[$ran_link[$ran_sort[$i]]]->inctime;?></i></span>
<span class="l_number"><i>缓存更新：<?php echo $ranxml[$ran_link[$ran_sort[$i]]]->cachetime;?></i></span>
          </div>
<div class="feeds_img"><a href="http://www.bilibili.com/video/av<?php echo $ranxml[$ran_link[$ran_sort[$i]]]->vcavid;?>/" target="_blank"><img src="<?php echo $ranxml[$ran_link[$ran_sort[$i]]]->vcimg;?>" alt="Star image" /></a></div><div class="clear"></div>
        </div>
		<?
		}
		?>
      </div>
	  
    </div>
	<div class="rightbar" style="display:block;float:left;width:320px;padding-top:10px;padding-left:10px;">
	      <div class="rankoverall" style="margin-top:20px;">
        <div class="ranker" style="width:100%">
          <div class="feeds_list" id="OverlayList">
            <div class="feeds_main">
              <div style="text-align: center">
                <a target="_blank" href="http://www.bilibili.com/sp/%E5%91%A8%E5%88%8AVOCALOID%E4%B8%AD%E6%96%87%E6%9B%B2%E6%8E%92%E8%A1%8C%E6%A6%9C"><img style="width:128px;height:128px" src="assets/vcniang.jpg" alt="vcniang" /></a>
              </div>
              <div class="clear"></div>
            </div>
          </div>
        </div>
      </div>
      <div class="ranktotalr">
        <div class="ranker" style="width:100%">
          <h4 style="background: #FE6D4B;">最新统计数据</h4>
          <div class="feeds_list">
            <div class="feeds_main">
              <div class="feeds_text">
                <span class="rnumber">
                <i>总计缓存期数：<?php echo count($ran_sort);?>期</i>
                </span>
                <span class="rnumber">
                <i>最近执行时间：<?php echo get_ftime();?></i>
                </span>
				<span class="rnumber">
                <i>最后缓存时间：<?php echo $ranxml[$ran_link[$ran_sort[0]]]->cachetime;?></i>
                </span>
              </div>
              <div class="clear"></div>
            </div>

          </div>
        </div>

      </div>
	  <div class="rankoverall" style="margin-top:20px;">
	  <div class="ranker" style="width:100%">
          <h4 style="background: #48CFAD;">相关链接</h4>
		   <span id="OldView"></span>
            <div class="feeds_list" id="OverlayList">
				<div class="feeds_main">
                  <div class="feeds_text">
                    <span class="rnumber" ><i><a target="_blank" href="http://vc.biliran.moe/">周刊VOCALOID中文排行榜</a></i></span>
                  </div>
                  <div class="clear"></div>
				</div>
				
				<div class="feeds_main">
                  <div class="feeds_text">
                    <span class="rnumber" ><i><a target="_blank" href="http://tieba.baidu.com/f?ie=utf-8&kw=%E6%B4%9B%E5%A4%A9%E4%BE%9D">百度洛天依吧</a></i></span>
                  </div>
                  <div class="clear"></div>
                </div>
				
				<div class="feeds_main">
                  <div class="feeds_text">
                    <span class="rnumber" ><i><a target="_blank" href="http://yun.baidu.com/share/home?uk=1766611049">失落受的度娘盘</a></i></span>
                  </div>
                  <div class="clear"></div>
                </div>
				
				<div class="feeds_main">
                  <div class="feeds_text">
                    <span class="rnumber" ><i><a target="_blank" href="http://tieba.baidu.com/p/3152230672">整合榜单</a></i></span>
                  </div>
                  <div class="clear"></div>
                </div>
				
				<div class="feeds_main">
                  <div class="feeds_text">
                    <span class="rnumber" ><i><a target="_blank" href="http://biliran.me/">周刊哔哩哔哩排行榜</a></i></span>
                  </div>
                  <div class="clear"></div>
                </div>
			</div>
		</div>
	  </div>
	</div>
  </div>
 </div>
 <div style="clear:both"></div>

	
	
<br/>
<div style="font-size:10px;color:#666;width:800px;text-align:center;margin:0 auto;padding:20px;"> &copy;2014. biliran.moe<p>本页面仅供数据查询使用<p>非官方缓存 如有侵权请与我说明<p><a href="data/vcran.xml" class="footer_text">xml文件下载</a>  ·  <a href="<?php echo SITEDIS;?>" class="footer_text">站点说明</a>  ·  <a href="http://git.oschina.net/linzyjx/vcran/tree/master" class="footer_text">代码开源</a></div>
<script src="assets/index.js?body=1"></script>
</body>
</html>
<?php 
//do执行脚本
file_get_contents(URL_ROOT.'do.php');
?>